package database.store;

import user.profile.Flags;

public enum PostFlags {
	PID("pid"), CREATION_DATE("data_criacao"), BID("bid"), SID("sid"), TEXT(
			"texto"), TITLE("titulo"), PICTURE_DESCRIPTION(
			"picture_desciption"), PICTURE_DATE("picture_date"), MOVIE_DESCRIPTION(
			"movie_desciption"), MOVIE_DATE("movie_date"), SOUND_DESCRIPTION(
			"sound_desciption"), SOUND_DATE("sound_date"),PICTURE_ID("imagemId"),
			MOVIE_ID("movieId"), AUDIO_ID("audioId");
	
	private String flag;

	/**
	 * This is constructor of this enum, the attributes are statically accessed, so
	 * this for internal use only.
	 * 
	 * @param flag The flag used.
	 */
	PostFlags(String flag) {
		this.flag = flag;
	}

	/**
	 * Provides the {@link String} that represents the flag.
	 * 
	 * @return The flag in a {@link String} format.
	 */
	public String getFlag() {
		return flag;
	}
	
	/**
	 * This method return all the flags i this enum.
	 * 
	 * @return The flags in a {@link String} format inside the array.
	 */
	public static String[] getFlags() {
		String[] flags = new String[Flags.values().length];
		for (int i = 0; i < flags.length; i++) {
			flags[i] = Flags.values()[i].getFlag();
		}
		return flags;
	}
}
